<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ page contentType="text/html; charset=utf-8" language="java"
	import="java.sql.*" errorPage=""%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>TracSetup</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="webmasterneo" />
<meta name="description"
	content="A short description of your site here." />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>

<body>

<div id="header">
<div class="header"></div>
</div>

<jsp:include page="/menu.do" />

<div id="body">
<div class="spacer"></div>
<div class="content"><form:form acceptCharset="UTF-8"
	commandName="loginForm" id="formUtente" action="modificaUtente.do"
	method="post">
	<input type="hidden" name="_page" value="0" />
	<table width="600" border="1" align="center">

		<tr>
			<td width="192">Username</td>
			<td width="392">
				<c:out value="${loginForm.utenti.username }"></c:out>
			</td>
		</tr>
		<tr>
			<td>Vecchia password</td>
			<td><input name="oldPassword" type="password" value="" /> <c:out
				value="${oldPasswordError }" />
		</tr>
		<tr>
			<td>Nuova password</td>
			<td><input name="newPassword" type="password" value="" /> <c:out
				value="${newPasswordError }" /></td>
		</tr>
		<tr>
			<td>Ripeti password</td>
			<td><input name="repeatPassword" type="password" value="" /> <c:out
				value="${repeatPasswordError }" /></td>
		</tr>
		<tr>
			<td>Nome</td>
			<td>
				<c:out value="${loginForm.utenti.nome }"></c:out>
			</td>
		</tr>
		<tr>
			<td>Cognome</td>
			<td>
				<c:out value="${loginForm.utenti.cognome }"></c:out>
			</td>
		</tr>
		<tr>
			<td>Email</td>
			<td><form:input path="utenti.email" /> <form:errors path="utenti.email" /></td>
		</tr>
		
		<tr>
			<td>
				Progetti abilitati
			</td>
			<td>
				<table border="0">
				<c:forEach items="${loginForm.utenti.progettis }" var="item">
					<tr>
						<td><c:out value="${item.descrizione }"/></td>
					</tr>
				</c:forEach>
				</table>
			</td>
		</tr>

		<tr>
			<td colspan="2"><input type="submit" name="modificaUtente"
				id="button" value="Invia" /> 
				<input type="button" name="Annulla" id="Annulla" value="Annulla" onclick="javascript:document.location.href='search.do'"/>
			</td>
		</tr>
	</table>
</form:form></div>
</body>

</html>
